Conversation
ezio-melotti
left a comment
There was a problem hiding this comment.
An early review with a few comments.
.github/workflows/review_pr.yml
Outdated
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- |
There was a problem hiding this comment.
Is something missing here?
There was a problem hiding this comment.
I update the key but for the rest it should be ok, I use this example
There was a problem hiding this comment.
actions/setup-python now natively includes pip caching.
Docs: https://github.com/actions/setup-python#caching-packages-dependencies
So we can remove the uses: actions/cache@v1 step, and update:
- - uses: actions/setup-python@v3
+ - uses: actions/setup-python@v4
with:
python-version: '3.x'
+ cache: pip
+ cache-dependency-path: '*requirements.txt'And the same in the other workflows.
.github/workflows/review_pr.yml
Outdated
| python-version: '3.9' | ||
| - name: Install Dependencies | ||
| run: python3 -m pip install coverage -U pip -r dev-requirements.txt | ||
| - name: Run code |
There was a problem hiding this comment.
A more descriptive name would be better.
There was a problem hiding this comment.
Just to be sure, do you mean to change the name "Run code" ?
|
@sabderemane Would you mind to address the reviews, please? It would be great to retire a third party Heroku service of extra maintainance, not-so-transparent deployment, non-public error logs, and a dedicated, actively waiting server loop. |
|
I will, for sure, I just didn't have time to do so yet :) |
c90276d to
375ad52
Compare
sabderemane
left a comment
There was a problem hiding this comment.
Thank you @ezio-melotti for the review 👍🏽
.github/workflows/review_pr.yml
Outdated
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- |
There was a problem hiding this comment.
I update the key but for the rest it should be ok, I use this example
.github/workflows/review_pr.yml
Outdated
| python-version: '3.9' | ||
| - name: Install Dependencies | ||
| run: python3 -m pip install coverage -U pip -r dev-requirements.txt | ||
| - name: Run code |
There was a problem hiding this comment.
Just to be sure, do you mean to change the name "Run code" ?
e147d18 to
447e73f
Compare
.github/workflows/close_pr.yml
Outdated
| - uses: actions/checkout@v2 | ||
| - uses: actions/cache@v1 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: '3.9' |
There was a problem hiding this comment.
Since we use dependabot we could also use the requirements file as the dependency path and skip the whole pip install step. That should speed up all workflows significantly.
There was a problem hiding this comment.
(Oops, this posted some outdated suggestions I started before but didn't post! Deleting them, sorry for confusion!)
There was a problem hiding this comment.
Dependency path: we install dev-requirements.txt, which includes installing -r requirements.txt
below I suggest using cache-dependency-path: '*requirements.txt', so if either of those files change, it invalidates the cache and downloads the new things.
CONTRIBUTING.rst
Outdated
| ================================== | ||
|
|
||
| Bedevere web service is deployed to Heroku, which is managed by The PSF. | ||
| Bedevere web service is currently launched with GitHub Actions, which is managed by The PSF. |
There was a problem hiding this comment.
"currently" is redundant
| Bedevere web service is currently launched with GitHub Actions, which is managed by The PSF. | |
| Bedevere web service is launched with GitHub Actions, which is managed by The PSF. |
.github/workflows/review_pr.yml
Outdated
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- |
There was a problem hiding this comment.
actions/setup-python now natively includes pip caching.
Docs: https://github.com/actions/setup-python#caching-packages-dependencies
So we can remove the uses: actions/cache@v1 step, and update:
- - uses: actions/setup-python@v3
+ - uses: actions/setup-python@v4
with:
python-version: '3.x'
+ cache: pip
+ cache-dependency-path: '*requirements.txt'And the same in the other workflows.
.github/workflows/review_pr.yml
Outdated
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 |
There was a problem hiding this comment.
Bump:
| - uses: actions/checkout@v2 | |
| - uses: actions/checkout@v3 |
.github/workflows/close_pr.yml
Outdated
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 |
There was a problem hiding this comment.
| - uses: actions/checkout@v2 | |
| - uses: actions/checkout@v3 |
.github/workflows/backport.yml
Outdated
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 |
There was a problem hiding this comment.
Bump version:
| - uses: actions/checkout@v2 | |
| - uses: actions/checkout@v3 |
.github/workflows/backport.yml
Outdated
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - uses: actions/setup-python@v3 |
There was a problem hiding this comment.
| - uses: actions/setup-python@v3 | |
| - uses: actions/setup-python@v4 |
.github/workflows/filepaths.yml
Outdated
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 |
There was a problem hiding this comment.
| - uses: actions/checkout@v2 | |
| - uses: actions/checkout@v3 |
.github/workflows/filepaths.yml
Outdated
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - uses: actions/setup-python@v3 |
There was a problem hiding this comment.
| - uses: actions/setup-python@v3 | |
| - uses: actions/setup-python@v4 |
.github/workflows/review_pr.yml
Outdated
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - uses: actions/setup-python@v3 |
There was a problem hiding this comment.
| - uses: actions/setup-python@v3 | |
| - uses: actions/setup-python@v4 |
.github/workflows/close_pr.yml
Outdated
| - uses: actions/checkout@v2 | ||
| - uses: actions/cache@v1 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: '3.9' |
There was a problem hiding this comment.
Since we use dependabot we could also use the requirements file as the dependency path and skip the whole pip install step. That should speed up all workflows significantly.
There was a problem hiding this comment.
I left some more review comments.
- It seems that some of the changes applied lately got lost during a merge -- those should be double checked and fixed;
- there were some formatting problems likely caused by a misconfigured editor (trailing spaces, tabs, changed indentation)
P.S.: you can probably batch merge most of these directly from GitHub.
.github/workflows/review_pr.yml
Outdated
| python-version: '3.9' | ||
| - name: Install Dependencies | ||
| run: python3 -m pip install coverage -U pip -r dev-requirements.txt | ||
| - name: Run code |
CONTRIBUTING.rst
Outdated
| App collaborators and members | ||
| '''''''''''''''''''''''''''''''''''' |
There was a problem hiding this comment.
| App collaborators and members | |
| '''''''''''''''''''''''''''''''''''' | |
| App collaborators and members | |
| ''''''''''''''''''''''''''''' |
bedevere/backport.py
Outdated
| router = gidgethub.routing.Router() | ||
|
|
||
| TITLE_RE = re.compile(r'\s*\[(?P<branch>\d+\.\d+)\].+\((?:GH-|#)(?P<pr>\d+)\)', re.IGNORECASE) | ||
| TITLE_RE = re.compile(r'\s*\[(?P<branch>\d+\.\d+)\].+\((?:GH-|#)(?P<pr>\d+)\)') |
There was a problem hiding this comment.
| TITLE_RE = re.compile(r'\s*\[(?P<branch>\d+\.\d+)\].+\((?:GH-|#)(?P<pr>\d+)\)') | |
| TITLE_RE = re.compile(r'\s*\[(?P<branch>\d+\.\d+)\].+\((?:GH-|#)(?P<pr>\d+)\)', re.IGNORECASE) |
bedevere/backport.py
Outdated
|
|
||
| original_issue = await gh.getitem(event.data['repository']['issues_url'], | ||
| {'number': original_pr_number}) | ||
There was a problem hiding this comment.
I'd recommend to configure your editor to remove trailing spaces and to add newlines at the end of the files automatically. I've also seen some tabs, so you might have to configure your editor to only use spaces too.
bedevere/backport.py
Outdated
| base_branch = pull_request["base"]["ref"] | ||
|
|
||
| if not is_maintenance_branch(base_branch): | ||
| if base_branch == "main": |
There was a problem hiding this comment.
This should also use not is_maintanance_branch.
You should double check that there aren't other updates that got revert during the merge (or possibly re-do the merge).
447e73f to
195dd5f
Compare
Codecov Report
@@ Coverage Diff @@
## main #459 +/- ##
============================================
- Coverage 100.00% 24.57% -75.43%
============================================
Files 18 18
Lines 1828 1864 +36
Branches 211 200 -11
============================================
- Hits 1828 458 -1370
- Misses 0 1401 +1401
- Partials 0 5 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
|
Sorry for the late update, I have address all the issues hopefully, thank you for the review @hugovk, @ezio-melotti and @DanielNoord. I changed my configuration to avoid editor issues 🙏🏽 I will see to continue and update tests. |
|
From #344 (comment):
From the following #344 (comment):
The problem surfaced while working on gh-568 so gh-569 was created instead. @sabderemane Probably, your PR is a dead-end then. We need to either close it in favor of gh-569 or think on some alterations. |
|
Closing in favor of gh-569, happy to help on other things instead :) |
Related to #344